package org.darkforest.enums;

/**
 * Created by valentina on 15/6/15.
 * 系统变量（setting表）key值枚举
 */
public enum SettingNameEnum {
    DOMAIN_NAME("domain_name"),
    WXPAY_APP_ID("wxpay_app_id"),                           //微信公众号应用ID
    WXPAY_APP_SECRET("wxpay_app_secret"),                   //微信公众号应用密钥
    WXPAY_TOKEN("wxpay_token"),                             //微信公众号服务器Token(令牌)
    WXPAY_PARTNER_KEY("wxpay_partner_key"),                 //微信支付商户秘钥
    WXPAY_MCHT_ID("wxpay_mcht_id"),                         //微信支付商户号
    WXPAY_SPBILL_CREATE_IP("wxpay_spbill_create_ip"),       //微信支付发起服务器IP
    WXPAY_SIGN_TYPE("wxpay_sign_type"),                     //微信支付签名方式
    WXPAY_NOTIFY_URL("wxpay_notify_url"),                   //微信支付回调地址
    WXPAY_TRADE_TYPE_JS("wxpay_trade_type_js"),             //微信支付调用方式
    WXPAY_INPUT_CHARSET("wxpay_input_charset"),             //微信支付编码
    WXPAY_REFUND_URL("wxpay_refund_url"),                   //微信支付退款链接地址
    WXPAY_PAY_INTERFACE("wxpay_pay_interface"),             //微信支付统一调用接口地址
    WXPAY_PAY_SIGN_URL("wxpay_pay_sign_url"),               //微信支付签名支付URL

    WXPAY_REFUND_CERTIFICATE_PWD("wxpay_refund_certificate_pwd"),             //微信退款调用证书密码
    WXPAY_REFUND_CERTIFICATE_DIR("wxpay_refund_certificate_dir"), //微信退款证书存放目录
    WXPAY_NATIVE_TYPE("wxpay_native_type"),   //扫码支付类型
    WXPAY_NATIVE_NOTIFY_URL("wxpay_native_notify_url"), //扫码支付回调地址

    // 阿里
    ALIOSS_ACCESS_ID("alioss_access_id"),
    ALIOSS_ACCESS_KEY("alioss_access_key"),
    ALIOSS_ENDPOINT("alioss_endPoint"),
    ALIOSS_BUCKETNAME("alioss_bucketName"),

    //站点设置
    SITE_NAME("site_name"),
    SITE_LOGO("site_logo"),
    MEMBER_LOGO("member_logo"),
    SELLER_CENTER_LOGO("seller_center_logo"),
    ICP_NUMBER("icp_number"),
    SITE_PHONE("site_phone"),
    SITE_PHONE1("site_phone1"),
    SITE_EMAIL("site_email"),
    STATISTICS_CODE("statistics_code"),
    TIME_ZONE("time_zone"),
    SITE_STATUS("site_status"),
    SITE_SEARCH("site_search"),
    PCWEBSITE("pcweb_site"), //pcweb访问域名
    WXWEBSITE("wx_website"), //微信端访问域名
    WXCORPID("wx_corp_id"), //企业微信corpid
    WXCORPSECRET("wx_corp_secret"), //企业微信corpsecret

    MERCHANTSITE("merchant_site"), //商户管理中心访问域名

    CLOSED_REASON("closed_reason"),
    SITE_COMPANY("site_company"),
    //邮件设置
    EMAIL_HOST("email_host"),
    EMAIL_PORT("email_port"),
    EMAIL_ADDR("email_addr"),
    EMAIL_ID("email_id"),
    EMAIL_PASS("email_pass"),
    EMAIL_TEST("email_test"),
    //支付设置
    ALIPAY_STATE("alipay_state"),
    ALIPAY_BANK_STATE("alipay_bank_state"),
    WECHATPAY_STATE("wechatpay_state"),

    //支付宝-实时到帐
    ALIPAY_ACCOUNT("alipay_account"),
    ALIPAY_KEY("alipay_key"),
    ALIPAY_PARTNER("alipay_partner"),
    //支付宝-网银支付
    ALIPAY_BANK_ACCOUNT("alipay_bank_account"),
    ALIPAY_BANK_KEY("alipay_bank_key"),
    ALIPAY_BANK_PARTNER("alipay_bank_partner"),
    //微信支付

    //结算用的字段
    SETTLEMENT_REGISTER_INTEGRATION("settlement_register_integration"),             //注册送积分：
    SETTLEMENT_RECOMMEND_INTEGRATION("settlement_recommend_integration"),               //推荐送积分：
    SETTLEMENT_CONSUME_INTEGRATION("settlement_consume_integration"),             //消费送积分： （每百元送积分）
    SETTLEMENT_ALTOGETHER_INTEGRATION("settlement_altogether_integration"),               //推荐消费积分共：
    SETTLEMENT_LEVEL3("settlement_level3"),             //三级比例：
    SETTLEMENT_LEVEL2("settlement_level2"),             //二级比例：
    SETTLEMENT_LEVEL1("settlement_level1"),             //一级比例：
    SETTLEMENT_RETURN_INTEGRATION("settlement_return_integration"),               //非代理商品返还积分：
    SETTLEMENT_SUBSIDY("settlement_subsidy"),               //同级代理补贴：
    SETTLEMENT_SUBSIDY_TIME("settlement_subsidy_time"),             //同级代理补贴时间：

    //运营基本设置
    OPERATION_PROMOTION_ALLOW("operation_promotion_allow"),
    OPERATION_GROUPBUY_ALLOW("operation_groupbuy_allow"),
    OPERATION_POINTS_ISUSE("operation_points_isuse"),
    OPERATION_POINTSHOP_ISUSE("operation_pointshop_isuse"),
    OPERATION_POINTPROD_ISUSE("operation_pointprod_isuse"),
    OPERATION_VOUCHER_ALLOW("operation_voucher_allow"),
    OPERATION_POINTS_REG("operation_points_reg"),
    OPERATION_POINTS_LOGIN("operation_points_login"),
    OPERATION_POINTS_COMMENTS("operation_points_comments"),
    OPERATION_POINTS_ORDERRATE("operation_points_orderrate"),
    OPERATION_POINTS_ORDERMAX("operation_points_ordermax"),
    PROXYJOINPIC("proxy_joinin_pic"),
    PROXYJOINHINT("proxy_joinin_hint"),
    OPERATION_MOBILE_PHONE("operation_mobile_phone"),  // 订单发送对象的手机号
    OPERATION_MAIL_ADDRESS("operation_mail_address"),  // 体检预约信息发送管理员的邮箱地址

    //会员级别
    MEMBER_LEVEL_ZERO("member_level_zero"),
    MEMBER_LEVEL_ONE("member_level_one"),
    MEMBER_LEVEL_TWO("member_level_two"),
    MEMBER_LEVEL_THREE("member_level_three"),
    MEMBER_LEVEL_FOUR("member_level_four"),
    MEMBER_LEVEL_FIVE("member_level_five"),

    //qq互联
    QQ_ISUSE("qq_isuse"),
    QQ_APPCODE("qq_appcode"),
    QQ_APPID("qq_appid"),
    QQ_APPKEY("qq_appkey"),

    //上传设置
    IMAGE_MAX_FILESIZE("image_max_filesize"),
    IMAGE_ALLOW_EXT("image_allow_ext"),
    DEFAULT_GOODS_IMAGE("default_goods_image"),
    DEFAULT_STORE_LOGO("default_store_logo"),
    DEFAULT_STORE_AVATAR("default_store_avatar"),
    DEFAULT_USER_PORTRAIT("default_user_portrait"),
    LOGIN_PIC1("login_pic1"),
    LOGIN_PIC2("login_pic2"),
    LOGIN_PIC3("login_pic3"),
    LOGIN_PIC4("login_pic4"),

    // 图片服务器
    IMAGE_UPLOAD_ENDPOINT("image_upload_endPoint"),
    IMAGE_SHOW_ENDPOINT("image_show_endPoint"),

    //统计设置
    GOODSPRICERANGE("goodspricerange"),
    ORDER_DETAIL_HREF("order_detail_href"),
    MY_ACCOUNT_HREF("my_account_href"),



    SEND_MOBILEMSG_ACCOUNT("send_mobilemsg_account"), //手机短信接口 账号
    SEND_MOBILEMSG_PASSWORD("send_mobilemsg_password"), //手机短信接口 密码
    SEND_MOBILEMSG_URL("send_mobilemsg_url"), //手机短信接口 应用地址，类似于http://ip:port/msg/
    SEND_MOBILEMSG_NEEDSTATUS("send_mobilemsg_needstatus") //手机短信接口 是否需要返回值
    ;
    //END


    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    private SettingNameEnum(String name) {
        this.name = name;
    }

    public static SettingNameEnum getSettingNameEnum(String name){
        SettingNameEnum settingNameEnum = null;
        for(SettingNameEnum nameEnum : SettingNameEnum.values()){
            if(name!=null && nameEnum.getName().equals(name)){
                settingNameEnum = nameEnum;
            }
        }
        return settingNameEnum;
    }
}
